/* Bug when load fixed-top element because parent has another height. */

function actionBarOffset (obj) {
    element = $(obj).parent().offset();
    $(obj).css('left', element.left+1);
    
    padding_right = $('.row [class*="col-"]').css('padding-right');
    padding_right = parseInt(padding_right)+1;
    $(obj).css('right',padding_right);
}

actionBar = $('.action-bar');
actionBar.affix({
    offset: {
        top: function() {
            element = $('.action-bar').offset();
            return (this.top = element.top);
        }
    }
}).after(actionBarOffset('.action-bar'));
  
$(window).resize(function() {
    actionBarOffset('.action-bar');
});

$(document).ready ( function() {
    actionBarOffset('.action-bar');
});
